Ext.onReady(function() {

	login_panel = new Ext.form.FormPanel({
		style:'margin-left:20%',
		width:300,
		frame:true,
		items:[
			{
				xtype:'textfield',
				fieldLabel:'Email',
				allowBlank:false
			},
			{
				xtype:'textfield',
				fieldLabel:'Password',
				allowBlank:false
			}
		],
		buttons:[
			{
				text:'Login',
				handler: function() {
					if (login_panel.getForm().isValid()) {
						login_panel.getForm().submit({
							url:'/login_ajax/login',
							onSuccess: function() {
							}
						})

					}
				}
			}
		]
		
	});

	login_panel.render('js_content');

});
